import { getUserDepID, getCompanyID, getUserID } from '@/utils';

/** 废旧物资管理Manage数据范围权限判断 */
export const MaterialAndAssetManageTab = (curRes: Record<string, any>) => {
  if (curRes?.['/assetStuff/waste/createCompanyID']) {
    return {
      createCompanyID: getCompanyID(),
      params: 'createCompanyID',
    };
  } else if (curRes?.['/assetStuff/waste/createDepartmentID']) {
    return {
      createDepartmentID: getUserDepID(),
      params: 'createDepartmentID',
    };
  } else if (curRes?.['/assetStuff/waste/createrID']) {
    return {
      createrID: getUserID(),
      params: 'createrID',
    };
  } else {
    return {};
  }
};
